package com.wkbb.sports.service;

import java.util.List;
import java.util.Map;

import com.github.pagehelper.PageInfo;
import com.wkbb.common.dto.ResultDTO;
import com.wkbb.sports.dto.*;
import com.wkbb.sports.model.*;

public interface TrainService {
	
	HlifeTrain addTrain(TrainDto train)throws Exception;

	TrainDto getTrain(long trainId)throws Exception;
	
	List<TrainStudentDto> queryTrainStudentList(Map<String, Object> params)throws Exception;
	
	PageInfo<TrainStudentDto> queryTrainStudentList4Persion(Map<String, Object> params, Integer pageNo, Integer pageSize)throws Exception;

	PageInfo<TrainDto> queryTrainList(Map<String, Object> params, int pageNo, int pageSize)throws Exception;

	List<HlifeDevice> queryDeviceList(Map<String, Object> params)throws Exception;
	
	int modifyDevices(List<DeviceDto> devices)throws Exception;

	StudentTrainInfoDto getStudentTrainInfo(Long trainId, Long studentId)throws Exception;

	Double queryTrainStudentSummary(Map<String, Object> params)throws Exception;

	Map<String, Object> getTeacherTrainWholeStat(Long orgId, Long teacherId);

	Map<String, Object> getTeacherTrainStat(Long orgId, Long teacherId, Integer projectKind);

	PageInfo<TrainStudentDto> getTrainFlunkStudentPageList(Long orgId, Long classId, Integer projectKind, String beginDate, String endDate, Integer pageNo, Integer pageSize);

	Map<String,Object> getTeacherTrainStudentReport(Long orgId, Long studentId, Integer projectKind, String beginDate, String endDate);

	Map<String, Object> getTrainStudentReport(Long orgId, Long studentId, Integer projectKind, String beginDate, String endDate)throws Exception;

	HlifeDeviceAuthorizationLog authorizationDevices(HlifeDeviceAuthorizationLog deviceAuthorizationLog, String devices);

	PageInfo<HlifeDeviceAuthorizationLog> queryDeviceAuthorizationLogList(Byte projectKind, int pageNo, int pageSize);

	HlifePadAuthorizationLog getPadAuthorizationStatus(String padId);

	int applyPadAuthorization(HlifePadAuthorizationLog padAuthorizationLog);

	int auditPadAuthorization(Long id, Byte status, String name);

	PageInfo<HlifePadAuthorizationLog> queryPadAuthorizationLogList(String padId, int pageNo, int pageSize);

	List<HlifeDeviceAuthorizationLog> getDeviceAuthorizationCount();
	
	List<HlifeDevice> queryOrgDeviceList(Map<String, Object> params)throws Exception;
	
	Map<String,Object> getSportsReportToFamily(Long orgId, Long userId, String trainDate, Long projectId);

	PageInfo<HlifeDevice> getDevicePageList(Map<String, Object> params, int pageNo, int pageSize);

	void changeDeviceStatus(Long id, Integer status);

	PageInfo<HlifeDeviceAuthorization> queryDeviceAuthorizationList(Integer projectKind, int pageNo, int pageSize);

	ResultDTO<LatelStuSportDto> getLatelyStuSport(Map<String, Object> params);

	PageInfo<TrainStuDto> getTrainListByStudent(Map<String, Object> params, int pageNo, int pageSize);

	TrainStuDto getTrainStudent(Map<String, Object> params);

    PhysicalAnalysisDto getStuPhysicalAnalysis(String studentId);
}
